Re: [SQL] How to use text type field.... - Mailing list pgsql-sql

From Herouth Maoz
Subject Re: [SQL] How to use text type field....
Date
Msg-id l03110702b276fba6d30b@[147.233.159.109]
Whole thread Raw
In response to How to use text type field....  ("송기원" <schiva@m2000.co.kr>)
List pgsql-sql
At 7:58 +0200 on 17/11/98, =?euc-kr?B?vNux4r/4?= wrote:


>
> Hi~ Everyone...
>
> I have some problem... with PostgreSql Version 6.4
>
> I don't know how to use text type data filed...
>
> Hm...
> ---------------------------------------------------------------
> create table test(
>     id     int primary key,
>     data1 text)
>
> How to use "insert into test........"  ??
> How to use "update test ....." ???
>
> data1 size is so!!! Big....~~~ Can't execute query...in C Language....
>
> Do you have some sample code with C Language...???
>
> Anybody.... Please.. Help me...!!

Text type is nothing special. You just use

INSERT INTO TEST (id, data1)
VALUES ( 12345, 'This is the text I wanted to Enter' );

and

UPDATE TEST
SET data1 = 'This is the new text I wanted to Enter';

That's all there is to it. Put the text within single quoute. Escape single
quotes within the text by doubling them ('' instead of '). The text may
include newlines and everything:

INSERT INTO TESTE (id, data1)
VALUES (
123456,
'This is a three-line
text field
within the table' );

Just remember not to pass the maximum row size, which I believe is still 8k
for all the fields together.

Herouth

--
Herouth Maoz, Internet developer.
Open University of Israel - Telem project
http://telem.openu.ac.il/~herutma



pgsql-sql by date:

Previous
From: "송기원"
Date:
Subject: How to use text type field....
Next
From: "Nicoleta TATARU"
Date:
Subject: unsubscribe